package com.yuanchu.store.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.common.utils.PageResult;
import com.yuanchu.store.entity.YoshopUserPointsLogEntity;

/**
 * 用户积分变动明细表
 *
 * @author adan
 * @email 2028038953@gmail.com
 * @date 2023-12-19 20:57:19
 */
public interface YoshopUserPointsLogService extends IService<YoshopUserPointsLogEntity> {


    /**
     * 查询用户积分变动明细
     *
     * @param userId
     * @param page
     * @return
     */
    PageResult<YoshopUserPointsLogEntity> queryUserPointsLog(Integer userId, Integer page);

    /**
     * 减少用户积分
     *
     * @return
     */
    boolean decrUserPoints(Integer userId, Integer scene, Integer points, String orderNo, Integer storeId);

    /**
     * 奖励用户积分
     *
     * @return
     */
    boolean bonusUserPoints(Integer userId, Integer pointsBonus, String orderNo, Integer storeId);
}

